<?php

namespace Biz\model\admin;

/**
 *
 * @author lee
 *
 */


class AdminUser extends \Doraemon\pockets\datebase\BaseDbModel
{

    const _CONFIG_FILE_ = 'db_admin';

    const _CONFIG_SELECT_ = 'db_shop_admin';

    const _DATABASE_ = 'shop_admin';

    const _TABLE_NAME = 'admin_users';

    public static function getAdminList($adminUids)
    {
        $list = empty($adminUids) ? [] : self::select("*", ['id' => $adminUids]);

        $formatData = [];

        foreach ($list as $admin) {
            $formatData[$admin["id"]] = $admin;
        }

        return $formatData;
    }
    public static function getAdminInfo($adminUid){
        $info = self::get(['id','username','name'],['id'=>$adminUid]);

        return $info;
    }

}
